
package com.letoken.platform.admin.enums;

public enum EnumAddressType {
    USER(0,"用户地址"),
    SHOP(1,"商家地址"),
    STATUS_99(99,"");

    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    EnumAddressType(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static EnumAddressType getInstance(Integer code){
        EnumAddressType cause = EnumAddressType.valueOf("STATUS_" + code);
        return cause == null ? STATUS_99 : cause;
    }
}
